<?php
//
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'main';
if($_RQ['op']=='main'){
	$params=array(
		'uniacid'=>$_SESSION['uniacid'],
		'status'=>1,
	);
	$id=intval($_RQ['id']);
	$current_gift=$this->pdo_get('goods_gift',array('uniacid'=>$_SESSION['uniacid'],'id'=>$id));
	$giftgoods=json_decode($current_gift['gifts'],true);
	foreach($giftgoods as &$gv){
			$gv['price']=pdo_getcolumn('jy_weishop_goods',array('id'=>$gv['id'],'uniacid'=>$_SESSION['uniacid']),'price');
	}
	$return['item']=$current_gift;
	$return['list']=$giftgoods;
	set_html('title',$return['shopset']['title']?:'礼品列表');
	$return['sharedata']=array(
		'title'=>$return['setting']['share_title']?'活动礼品'.$return['setting']['share_title']:'活动礼品-在线商城',
		'desc'=>$return['setting']['share_desc']?$return['setting']['share_desc']:'活动礼品，一个属于自己的个人商城！',
		'link'=>custom_url('jy_weishop/goods.gift/fromuser='.$_SESSION['uid'],true),
		'imgUrl'=>ATTACHMENT_URL.$setting['share_image']
	);
	exi($return);
}	
?>